<?php

class Wellcome extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->session->userdata('lang');
        $this->registrar_visita('wellcome');
    }

    public function index() {
        $this->load->view('front_end/langSelection');
    }

    public function chgLang($lang) {
        $this->session->set_userdata('lang', $lang);
        $red = base_url() . 'about';
        redirect($red);
    }

    public function registrar_visita($place) {
        $v_sitio = "ciempiess.org/$place";
        $v_date = date('Y-m-j H:i:s');
        $v_ip = $this->input->ip_address();
        $this->ciempies_model->registrar_visita($v_sitio, $v_date, $v_ip);
    }

}
